The present invention relates to a method and apparatus for automatically positioning one or more images within a region. The invention also relates to a computer readable medium having recorded thereon a computer program for automatically positioning one or more images within a region.
Electronic photo-albums have become increasingly popular in recent times. These electronic photo-albums typically take the form of a collection of images stored using a non-volatile memory device, from which a user can retrieve the image for displaying on a display device. Usually, the images are gathered in digital form, and may, for example, be scanned by an electronic scanner, down-loaded from the Internet or produced by a digital camera. A collection of these images can be stored electronically to create an electronic photo-album, analogous to the traditional family photo-album, which uses photographic prints.
Presently, electronic photo-albums take the form of a collection of images, a user of the album being able to associate a caption or brief description with each image. For example, a user can collect a series of family photographs of a wedding, whether from a digital video or still camera, and associate a caption such as a date and a brief description of the event with each image. If desired, an electronic photo-album can be reproduced from the memory device by a high quality output device, such as a high-resolution colour printer, to produce an album substantially similar to a conventional photo-album.
The images of electronic photo-albums are typically arranged on an electronic page to provide a visually pleasing arrangement. Typically, the user manually undertakes the arrangement of the images.
Australian Patent 714221 corresponding to U.S. patent application Ser. No. 09/026,614 filed on Feb. 20, 1998 describes a method for automatically arranging digital images to produce pleasing results. In particular, the method initially arranges the images on the page in accordance with a first predetermined layout pattern. The method then rearranges the images in accordance with a predetermined set of rules. The following are examples of types of such rules: 1) Non Printable Area Rule: acts to constrain images within a predetermined layout. 2) Controlled Overlapping Rule: provides no overlapping on a page, or at least minimising the amount of overlapping required for a given set of images. However, if it is desired that the images overlap, the controlled overlapping rule may be employed to control the style and amount of overlapping for each image. 3) Vertical Space Distribution Rule: balances (or evens out) space distribution surrounding images in a vertical direction. Often, unprinted or unused space on a page surrounding an image is referred to as xe2x80x9cwhite spacexe2x80x9d, and the Vertical Space Distribution Rule attempts to balance the white space above and below an image. 4) Horizontal Space Distribution Rule: substantially similar to the Vertical Space Distribution Rule, but acts in the horizontal direction. 5) Edge Alignment Rule: aligns alike edges of images that fall within a predetermined range threshold position both horizontally and vertically. 6) Adjacent Edges Rule: keeps adjacent edges of images on a page a predetermined minimum or maximum distance apart. 7) Centre Attraction Rule: positions an image of a predetermined central line of the layout area.
These various rules are not rigidly satisfied for every positioning of images on a page. In some cases, this is not possible, as the application of different rules may result in mutually opposing requirements in terms of image placement. The various rules are satisfied in a proportional manner to achieve an optimum compromise that provides a desired result. Accordingly, each rule by itself does not result in a desired result for all circumstances. Moreover, the application of one or more said rules, in some circumstances, does not necessarily result in a pleasing arrangement of images.
It is an image of the present invention to provide an alternative method and/or ameliorate one or more disadvantages of the prior art.
According to a first aspect of the invention, there is provided a method of automatically positioning a plurality of images within a region, the method comprising the steps of: (a) computing a net force exerted on each said image by all other said images, wherein the net force exerted on each said image is the total of forces exerted on that image, and wherein any said force exerted on any one said image by any other said image is a function of the distance between the said any one image and the said any other image, a first image characteristic of said any one image and a second image characteristic of said any other image; and (b) moving each said image a distance, which is a function of the net force acting on the image, in the direction of the net force.
According to a second aspect of the invention, there is provided a method of automatically positioning a plurality of images within a layout region, wherein the images are defined by a height h and width w and the method comprises the following steps of:
(a) computing a field E at each said image due to every other said image, where a said field E due to a said image at a distance p from the centre of the image is       E    =                  α                                            (                                                d                  x                                w                            )                        2                    +                                    (                                                d                  y                                h                            )                        2                              +                        (                      1            -            α                    )                ⁢                  wh                                    d              x              2                        +                          d              y              2                                            ,
xe2x80x83where   α  =      wh          p      2      
when p is greater than {square root over (wh)} and a xcex1=1 when p is less than or equal to {square root over (wh)}, and dx is the horizontal distance and dy is the vertical distance components of distance p; (b) computing a sum of forces exerted on each said image by every other said image, where said sum of forces acting on any said image is equal to a sum of said fields acting on said any image multiplied by the surface area wh of said any image; (c) moving each said image a distance proportional to the sum of forces acting on the image, in the direction of the sum of forces; and (d) repeating steps (a) to (c) a predetermined number of times.
According to a third aspect of the invention, there is provided a method of automatically positioning one image within a region of one or more other images, the method comprising the steps of: (a) computing a net force exerted on said one image by all of said other images, wherein the net force exerted on said one image is the total of forces exerted on that image, and wherein any said force exerted on said one image by any one of said other images is a function of the distance between the said one image and the said any one of the said other images, a first image characteristic of said one image and a second image characteristic of said any one of the said other images; and (b) moving said one image a distance, which is a function of the net force acting on the said one image, in the direction of the net force.
According to a fourth aspect of the invention, there is provided apparatus for automatically positioning a plurality of images within a region, the apparatus comprising: means for computing a net force exerted on each said image by all other said images, wherein the net force exerted on each said image is the total of forces exerted on that image, and wherein any said force exerted on any one said image by any other said image is a function of the distance between the said any one image and the said any other image, a first image characteristic of said any one image and a second image characteristic of said any other image; and means for moving each said image a distance, which is a function of the net force acting on the image, in the direction of the net force.
According to a fifth aspect of the invention, there is provided apparatus for automatically positioning a plurality of images within a layout region, wherein the images are defined by a height h and width w and the apparatus comprises: means for computing a field E at each said image due to every other said image, where a said field E due to a said image at a distance p from the centre of the image is       E    =                  α                                            (                                                d                  x                                w                            )                        2                    +                                    (                                                d                  y                                h                            )                        2                              +                        (                      1            -            α                    )                ⁢                  wh                                    d              x              2                        +                          d              y              2                                            ,
where   α  =      wh          p      2      
when p is greater than {square root over (wh)} and xcex1=1 when p is less than or equal to {square root over (wh)}, and dx is the horizontal distance and dy is the vertical distance components of distance p; means for computing a sum of forces exerted on each said image by every other said image, where said sum of forces acting on any said image is equal to a sum of said fields acting on said any image multiplied by the surface area wh of said any image; means for moving each said image a distance proportional to the sum of forces acting on the image, in the direction of the sum of forces; and means for repeating the operations of the means for computing a field, the means for a sum of forces, and the means for moving a predetermined number of times.
According to a sixth aspect of the invention, there is provided apparatus for automatically positioning one image within a region of one or more other images, the apparatus comprising means for computing a net force exerted on said one image by all of said other images, wherein the net force exerted on said one image is the total of forces exerted on that image, and wherein any said force exerted on said one image by any one of said other images is a function of the distance between the said one image and the said any one of the said other images, a first image characteristic of said one image and a second image characteristic of said any one of the said other images; and means for moving said one image a distance, which is a function of the net force acting on the said one image, in the direction of the net force.
According to a seventh aspect of the invention, there is provided a computer readable medium comprising a computer program for automatically positioning a plurality of images within a region, the computer program comprising: code for computing a net force exerted on each said image by all other said images, wherein the net force exerted on each said image is the total of forces exerted on that image, and wherein any said force exerted on any one said image by any other said image is a function of the distance between the said any one image and the said any other image, a first image characteristic of said any one image and a second image characteristic of said any other image; and code for moving each said image a distance, which is a function of the net force acting on the image, in the direction of the net force.
According to an eighth aspect of the invention, there is provided a computer readable medium comprising a computer program for automatically positioning a plurality of images within a layout region, wherein the images are defined by a height h and width w and the computer program comprises: code for computing a field E at each said image due to every other said image, where a said field E due to a said image at a distance p from the centre of the image is       E    =                  α                                            (                                                d                  x                                w                            )                        2                    +                                    (                                                d                  y                                h                            )                        2                              +                        (                      1            -            α                    )                ⁢                  wh                                    d              x              2                        +                          d              y              2                                            ,
where   α  =      wh          p      2      
when p is greater than {square root over (wh)} and xcex1=1 when p is less than or equal to {square root over (wh)}, and dx is the horizontal distance and dy is the vertical distance components of distance p; code for computing a sum of forces exerted on each said image by every other said image, where said sum of forces acting on any said image is equal to a sum of said fields acting on said any image multiplied by the surface area wh of said any image; code for moving each said image a distance proportional to the sum of forces acting on the image, in the direction of the sum of forces; and code for repeating the operations of the means for computing a field, the means for a sum of forces, and the means for moving a predetermined number of times.
According to an ninthe aspect of the invention, there is provided a computer readable medium comprising a computer program for automatically positioning one image within a region of one or more other images, the computer program comprising: code for computing a net force exerted on said one image by all of said other images, wherein the net force exerted on said one image is the total of forces exerted on that image, and wherein any said force exerted on said one image by any one of said other images is a function of the distance between the said one image and the said any one of the said other images, a first image characteristic of said one image and a second image characteristic of said any one of the said other images; and code for moving said one image a distance, which is a function of the net force acting on the said one image, in the direction of the net force.